const crypto = require('crypto');

module.exports = {
    "secretKey": "waibiwaibi",
    "algorithms": ["HS256"],
    "unless": {
        path: [
            /^\/users\/.*$/, "/favicon.ico", "/upload", /^\/images\/.*$/, /^\/admins\/.*$/, "/getFrontToken"
        ]
    },
    sha256(str) {
        let sha = crypto.createHash('sha256');
        return sha.update(str).digest('hex');
    }
}